package com.ruoyi.system.domain.dto;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

@Data
public class BdmShoppingCostDto {
    /** 类型：1 商品订单，2 云仓自提 */
    private Integer type;

    /** 分段规则集合 */
    @Valid
    @NotEmpty
    private List<Rule> rules;

    @Data
    public static class Rule {
        @NotNull
        private BigDecimal startPrice;

        @NotNull
        private BigDecimal endPrice;

        @NotNull
        private BigDecimal price;
    }
}
